package com.example.service;

import com.example.mapper.UsersMapper;
import com.example.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UsersMapper usersMapper;
    public Users seletById(Integer id){
        Users users = usersMapper.selectByPrimaryKey(id);
        return users;
    }

    public Integer insertUser(Users users){
        Integer result = usersMapper.insert(users);
        return  result;
    }

}
